package cn.edu.ssm.utils;


import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.core.convert.converter.Converter;

/**
 * 时间日期转换工具类
 * @author guibin
 *
 */
public class DateConvert implements Converter<String, Date>{

	@Override
	public Date convert(String stringDate) {
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
			try {
				return simpleDateFormat.parse(stringDate);
			} catch (ParseException e) {
				e.printStackTrace();
			}
			return null;
	}

}
